/**
 * Created with Intellij IDEA.
 * Description;
 * User:墨琦
 * Data:2023-03-08
 * Time:14:38
 */
public class Person {
   private String name;
   private String sex;
   private int age;
   Person( String name, String sex, int age)
   {
       this.name=name;
       this.age=age;
       this.sex=sex;
       System.out.println("姓名："+name+"性别："+"年龄："+age);
   }
    public void timeTable(String name)
    {
        System.out.println("某人课表");
    }

}

class Teacher extends Person{
    private String department="信工";
    Teacher(String name, String sex, int age){
        super(name, sex,age);
    }
    public void timeTable()
    {
        System.out.println("老师课表");

    }
    public void printDepartment()
    {
        System.out.println(department);
    }

}

class Student extends Person{
    private String major="计算机";
    Student(String name, String sex, int age){
        super(name, sex,age);
    }
    public void timeTable()
    {
        System.out.println("学生课表");

    }
    public void printMajor()
    {
        System.out.println(major);
    }
}


